﻿@model PSTUTemplate.Models.Object.ViewModels.AdminProfileViewModel

@using (Html.BeginForm())
{
    <fieldset>
        <legend>Search</legend>
        <table>
            <tbody>
                <tr>
                    <td>
                        Roll: @Html.EditorFor(model => model.StudentProfile.Roll)
                    </td>
                    <td>
                        <input type="submit" value="Search" />
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>
}
@using (Html.BeginForm())
{
<fieldset>
    <legend>Profile View</legend>
    <table>
        <tr>
            <th>
                Name
            </th>
            <th>
                Roll
            </th>
            <th>
                Registration
            </th>
            <th>
                Session
            </th>
            
            <th>
                Level
            </th>
            <th>
                Semester
            </th>
            <th>
                Faculty
            </th>
            <th>
                Email
            </th>
        </tr>
        @foreach (var item in Model.ProfileList)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Roll)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.RegistrationNo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.StartSession)
                </td>
                
                <td>
                     @Html.DisplayFor(modelItem => item.Level)   
                </td>
                <td>
                     @Html.DisplayFor(modelItem => item.Semester)   
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Faculty)
                </td>
                <td>
                    <a href="mailto:@Html.DisplayFor(modelItem => item.Email)">@Html.DisplayFor(modelItem => item.Email)</a>
                </td>
                <td>
                    @Html.ActionLink("Details", "Details", new { id = item.UserId }) |@Html.ActionLink("Edit", "Edit", new { id = item.UserId }) 
                </td>
            </tr>
        }
    </table>
</fieldset>
}